Package-level declarations

Types

Link copied to clipboard
class EllipseRect(w: Dp, h: Dp, r: FourCorners = FourCorners()) : Shape

Creates rectangle shapes with width w, height h, and optionally rounded corners with radius r.

Link copied to clipboard
data class FourCorners(val topLeft: Pair<Dp, Dp> = Pair(first = 0.dp, second = 0.dp), val topRight: Pair<Dp, Dp> = Pair(first = 0.dp, second = 0.dp), val bottomRight: Pair<Dp, Dp> = Pair(first = 0.dp, second = 0.dp), val bottomLeft: Pair<Dp, Dp> = Pair(first = 0.dp, second = 0.dp))

Defines the x and y radii used by the corners of a rectangle.

Functions

Link copied to clipboard
fun MaterialTheme.roundrect(size: Dp, radius: Dp): EllipseRect

Helper function to create squares with equal radii corners.

Helper function to create squares with FourCorners.

fun MaterialTheme.roundrect(size: Dp, corners: Pair<Dp, Dp>): EllipseRect

Helper function to create squares with equal corners with different (x, y) radii.

fun MaterialTheme.roundrect(size: Pair<Dp, Dp>, radius: Dp): EllipseRect

Helper function to create rectangles with equal radii corners.

Helper function to create rectangles with FourCorners.

fun MaterialTheme.roundrect(size: Pair<Dp, Dp>, corners: Pair<Dp, Dp>): EllipseRect

Helper function to create rectangles with equal corners with different (x, y) radii.